package online.shenme.day03;

import java.util.Scanner;

//if与switch
public class Judge {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int password;
        while (true) {
            System.out.println("请设置用户名");
            String name = input.next();
            System.out.println("请设置密码(不超过6位数)");
            judge:
            while (true) {
                password = input.nextInt();
                if (password >= 0 && password <= 999999) {
                    switch (password) {
                        case 0, 111111, 222222, 333333, 444444, 555555, 666666, 777777, 888888, 999999, 123456, 654321:
                            System.out.println("您的密码过于简单，请重新输入");
                            break;
                        default:
                            System.out.println("设置成功！");
                            break judge;
                    }

                } else {
                    System.out.println("您的密码有误，请重新输入");
                }
            }
            System.out.println("是否继续设置新用户：");
            String temp = input.next();
            if (temp.equals("是")) {
            } else {
                break;
            }

        }


    }

}

